package sipus.database.model.config;

// Generated Apr 16, 2010 2:27:16 PM by Hibernate Tools 3.2.4.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import sipus.common.Common;


/**
 * Bank generated by hbm2java
 */
@Entity
@Table(schema = "config", name = "schema_config")
public class SchemaConfig implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2463821577541439808L;
	private Long id;
	private String oleh;public String toString(){return nama;}

	public void setOleh(String oleh) {
		this.oleh = oleh;
	}

	public String getOleh() {
		if (oleh == null) {
			oleh = Common.getCurrentUser() == null ? "" : Common
					.getCurrentUser().getUserNama();
		}
		return oleh;
	}

	private Date tanggal_dirubah = new Date();

	public void setTanggal_dirubah(Date tanggal_dirubah) {
		this.tanggal_dirubah = tanggal_dirubah;
	}

	@Temporal(TemporalType.TIMESTAMP)
	public Date getTanggal_dirubah() {
		return tanggal_dirubah;
	}

	private String nama;
	private String schema_yang_digunakan;

	public SchemaConfig() {
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", insertable = false, unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "nama", nullable = false, length = 255)
	public String getNama() {
		return this.nama;
	}

	public void setNama(String nama) {
		this.nama = nama;
	}

	public void setSchema_yang_digunakan(String schema_yang_digunakan) {
		this.schema_yang_digunakan = schema_yang_digunakan;
	}

	public String getSchema_yang_digunakan() {
		return schema_yang_digunakan;
	}

}
